package com.itheima.mapper;

import com.itheima.pojo.Setmeal;
import com.itheima.dto.SetmealDishesDto;
import com.itheima.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 王同学
 */
@Mapper
@Repository
public interface SetmealMapper {

       int batchAdd(@Param("list") ArrayList<SetmealDishesDto> newlist);

       int add(@Param("stemeal") Setmeal stemeal);

       List<Setmeal> page(@Param("name")String name, @Param("start") Integer start,@Param("pageSize") Integer pageSize);

       boolean delete(@Param("list") List<String> list);

       boolean delBySetmealdishesIds(@Param("list") List<String> list);

       Setmeal findById(@Param("id") String id);

       int update(@Param("demo") SetmealVO demo);

       int countBysetmealId(@Param("id") String id);

       int delBysetmealId(String id);

       int AddsetmealDishes(@Param("list") ArrayList<SetmealDishesDto> newlis);

       Long getPageCountByName(String name);

       int updatestatus(@Param("ids") String ids,@Param("stu") int stu);
}
